package cn.edu.huas.shopping.pojo;

public class OrderItem {
    private Integer id;
    private String oid;
    private int pid;
    private String pname;
    private double price;
    private int qty;
    private double subtotal;

    public OrderItem() {
    }

    public OrderItem(Integer id) {
        this.id = id;
    }

    public OrderItem(Integer id, String oid, int pid, String pname, double price, int qty, double subtotal) {
        this.id = id;
        this.oid = oid;
        this.pid = pid;
        this.pname = pname;
        this.price = price;
        this.qty = qty;
        this.subtotal = subtotal;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getOid() {
        return oid;
    }

    public void setOid(String oid) {
        this.oid = oid;
    }

    public int getPid() {
        return pid;
    }

    public void setPid(int pid) {
        this.pid = pid;
    }

    public String getPname() {
        return pname;
    }

    public void setPname(String pname) {
        this.pname = pname;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public int getQty() {
        return qty;
    }

    public void setQty(int qty) {
        this.qty = qty;
    }

    public double getSubtotal() {
        return subtotal;
    }

    public void setSubtotal(double subtotal) {
        this.subtotal = subtotal;
    }

    @Override
    public String toString() {
        return "OrderItem{" +
                "id=" + id +
                ", oid='" + oid + '\'' +
                ", pid=" + pid +
                ", pname='" + pname + '\'' +
                ", price=" + price +
                ", qty=" + qty +
                ", subtotal=" + subtotal +
                '}';
    }
}
